Ext.define('Portal.view.main.Main', {
    extend: 'Ext.container.Viewport',
    requires: [
        'Portal.controller.MainController',
        'Portal.controller.main.TabPanelController',
        //
        'Portal.view.main.MainContainerWrap',
        'Portal.view.main.ToolbarWrap',

        //
        'Portal.view.home.Home'
    ],
    controller: 'main',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    listeners: {
        render: 'onMainViewRender'
    },
    cls:'webEasy-container',
    items: [
        {
            xtype: 'main.toolbarWrap',
            cls: 'toolbar-container',
            reference: 'toolbarContainer'
        },
        {
            xtype: 'main.mainContainerWrap',
            id: 'main-view-detail-wrap',
            reference: 'mainContainerWrap',
            itemId:'mainContainerWrap',
            items: [
                {
                    xtype: 'treelist',
                    reference: 'navigationTreeList',
                    itemId: 'navigationTreeList',
                    width: 200,
                    expanderFirst: false,
                    expanderOnly: false,
                    cls:'webEasy-nav-container',
                    listeners: {
                        selectionchange: 'onNavigationTreeSelectionChange'
                    }
                },
                {
                    xtype:'tabpanel',
                    flex: 1,
                    reference:'mainCardPanel',
                    itemId: 'contentPanel',
                    border:false,
                    frame:true,
                    controller:'main.tabPanelController',
                    items:[
                        {
                            title: '首页',
                            itemId:'home',
                            routeId:'home',
                            items:[
                                {
                                    xtype:'home.home',
                                    routeId:'home',
                                }
                            ]
                        }
                    ],
                    // plugins: [
                    //     {
                    //         ptype:'tabclosemenu',
                    //         closeAllTabsText: '关闭全部',
                    //         closeTabText: '关闭当前',
                    //         closeOthersTabsText: '关闭其它'
                    //     }
                    // ],
                    cls:'webEasy-body-container'
                }
            ],
        }
    ]
});
